<?php

/******************************************************************************
 *
 *	PROJECT: Flynax Classifieds Software
 *	VERSION: 4.0
 *	LISENSE: FL87MPRYOA0R - http://www.flynax.com/license-agreement.html
 *	PRODUCT: Auto Classifieds
 *	DOMAIN: www.siyaradiali.com
 *	FILE: REQUEST.PHP
 *
 *	This script is a commercial software and any kind of using it must be 
 *	coordinate with Flynax Owners Team and be agree to Flynax License Agreement
 *
 *	This block may not be removed from this file or any other files with out 
 *	permission of Flynax respective owners.
 *
 *	Copyrights Flynax Classifieds Software | 2012
 *	http://www.flynax.com/
 *
 ******************************************************************************/

/* load configs */
include_once( dirname(__FILE__) . "/../../includes/config.inc.php");

/* system controller */
require_once( RL_INC . 'control.inc.php' );

$url = $_GET['url'];
$number = $_GET['number'];
	
if ( $url && $number )
{
	$content = $reefless -> getPageContent($url);
	
	if ( $content )
	{
		$reefless -> loadClass('Rss');
		$reefless -> loadClass('Json');
		
		$rlRss -> items_number = $number;
		$rlRss -> createParser($content);
		$rss_feeds = $rlRss -> getRssContent();
		$rlRss -> clear();
	
		$output['total'] = count($rss_feeds);
		$output['data'] = $rss_feeds;
	
		echo $rlJson -> encode( $output );
	}
	else
	{
		echo false;
	}
}
else
{
	echo false;
}